home *** CD-ROM | disk | FTP | other *** search
- PXFSTAT(3F) Last changed: 1-6-98
-
-
- NNAAMMEE
- PPXXFFSSTTAATT - Retrieves the file status
-
- SSYYNNOOPPSSIISS
- IINNTTEEGGEERR _j_s_t_a_t,, _i_l_e_n,, _i_e_r_r_o_r
- CCAALLLL PPXXFFSSTTAATT((_p_a_t_h,, _i_l_e_n,, _j_s_t_a_t,, _i_e_r_r_o_r))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- IEEE standard interface for FORTRAN 77
-
- DDEESSCCRRIIPPTTIIOONN
- On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
- default when compiling programs with the MIPSpro 7 Fortran 90 compiler
- or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
- 7.2 F77 compiler.
-
- The PPXXFFSSTTAATT routine uses the ssttaatt system call to get the file status.
-
- When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
- UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
- kind unless documented otherwise. On UNICOS and UNICOS/mk, default
- kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
- IRIX, the default kind is KKIINNDD==44.
-
- The following is a list of arguments for this routine:
-
- _p_a_t_h An input character variable or array element containing the
- name of a file.
-
- _i_l_e_n An input integer variable containing the length of _p_a_t_h in
- characters. If _i_l_e_n is zero, all trailing blanks are removed
- before calling ssttaatt().
-
- _j_s_t_a_t An input integer variable or array element containing a handle
- for a stat structure. This handle should have been created by
- a call to the PPXXFFSSTTRRUUCCTTCCRREEAATTEE(3F) routine.
-
- _i_e_r_r_o_r An output integer variable that contains the status:
-
- Zero PPXXFFSSTTAATT returned the status information.
-
- Nonzero PPXXFFSSTTAATT was unable to return the status.
-
- In addition to errors returned by the ssttaatt(2) system call, the
- following errors may occur:
-
- EEIINNVVAALL If _i_l_e_n < 0 or _i_l_e_n > LLEENN((_p_a_t_h)).
-
- EENNOOMMEEMM If PPXXFFSSTTAATT is unable to obtain memory to copy _p_a_t_h.
-
- EEBBAADDHHAANNDDLLEE If _j_s_t_a_t is an invalid handle or has an incorrect handle
- type (UNICOS and UNICOS/mk systems only).
-
- The ssttaatt structure contains the following components:
-
- * sstt__mmooddee: File mode.
-
- * sstt__iinnoo: File serial number.
-
- * sstt__ddeevv: ID of device containing the file.
-
- * sstt__nnlliinnkk: Number of links.
-
- * sstt__uuiidd: User id of the owner of the file.
-
- * sstt__ggiidd: Group id of the owner of the file.
-
- * sstt__ssiizzee: File size in bytes for regular files. Unspecified for
- other files.
-
- * sstt__aattiimmee: Last time that data within the file was accessed.
-
- * sstt__mmttiimmee: Last time that data in the file was modified.
-
- * sstt__ccttiimmee: Last time that file status was changed.
-
- EEXXAAMMPPLLEESS
- program test
- character*10 path
- integer ilen, jstat, ierr,imode, istino
- path = 'stt.f'
- call pxfstructcreate('stat',jstat,ierr)
- print *,'structcreate error = ',ierr
- ilen=0
- call pxfstat(path, ilen, jstat, ierr)
- if (ierr.ne.0) then
- print *,'FAIL: error from pxfstat = ',ierr
- else
- print *,'PASS: No error from pxfstat = '
- endif
- call pxfintget(jstat,'st_ino',istino,ierr)
- call pxfintget(jstat,'mode',imode,ierr)
- print *,'st_ino = ',istino
- print *,'mode = ',imode
- call pxfstructfree(stat,ierr)
- end
-
- SSEEEE AALLSSOO
- _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-
- 2165, for the printed version of this man page.
-
-